{extends file='../header_footer.html'}

{block name=content}
<div class="layui-carousel" id="banner">
  <div carousel-item>
    {foreach $ad.index_banner.Ad as $each}
    <div><a href="{url($each.link)}" class="coverBg" style="background-image: url({$absroot}{$each.image});"><img  src="{$absroot}{$each.image}" class="hidden" alt="{$each.title}"/></a></div>
    {/foreach}
  </div>
</div>
<script>
layui.use('carousel', function(){
  var carousel = layui.carousel;
  //建造实例
  carousel.render({
    elem: '#banner'
    ,width: '100%' //设置容器宽度
    ,height:'500px'
    //,arrow: 'always' //始终显示箭头
    ,anim: 'fade' //切换动画方式
  });
});

</script>

<div id="Index">
    <div class="wrap clearfix">
        <div class="about">
            <div class="item_tit"><a href="{call menu_link id=12}">{menu(12,'title')}</a></div>
            <div class="item_con">
            {call trim_content html=$query_data[12].content length=200}
            </div>
        </div>
        <div class="news">
            <div class="item_tit"><a href="{call menu_link id=3}">{menu(3,'title')}</a></div>
            <div class="item_con">
                <ul class="list">
                    {foreach $query_data[3] as $item}
                    <li><span>[{$item.date}]</span><a href="{call view_link item=$item mdl=menu(3,'type')}">{$item.title}</a></li>
                    {/foreach}
                </ul>
            </div>
        </div>
    </div>
</div>

{/block}